/*
    Copyright (C) 2011  Hugo Arregui, FuDePAN

    This file is part of the FuDePAN Extensible Cache

    Feca is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Feca is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Feca.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef FECA_H

#define FECA_H

#include "cache.h"
#include "storage_policies.h"
#include "loading_policies.h"

namespace feca
{

//TODO[C++0x]: practicamente todo esto debe ser reescrito utilizando template typedefs
//TODO: build concepts comments for Loaders
struct FullLoadingAlias
{
    template<class Cache, class Loader>
    struct WType
    {
        typedef FullLoading<Cache, Loader> Type;
    };
};

template<class CacheOrLoaderType>
struct FullCache
{
    typedef Cache<MemStorage, FullLoadingAlias::WType, CacheOrLoaderType> Type;
};

template<int size>
struct SlidingWindowLoadingAlias
{
    template<class Cache, class Loader>
    struct WType
    {
        typedef SlidingWindowLoading<size, Cache, Loader> Type;
    };
};

template<int size, class CacheOrLoaderType>
struct SlidingWindowCache
{
    typedef Cache<MemStorage, SlidingWindowLoadingAlias<size>::template WType, CacheOrLoaderType> Type;
};
}
#endif

